package com.id.supaclean.ui.ram

import android.widget.ImageView
import androidx.core.os.bundleOf
import androidx.lifecycle.lifecycleScope
import com.id.supaclean.R
import com.id.supaclean.common.BaseFragment
import kotlinx.coroutines.delay

/**
 * Created by YiGo on 2022/6/14.
 */
class RamBoostFragment : BaseFragment() {
    override fun layoutId(): Int = R.layout.fragment_ramboost

    override fun initView() {
        view?.findViewById<ImageView>(R.id.ram_boost_fragment_back_iv)?.setOnClickListener {
            navigate(R.id.action_ramBoostFragment_to_firstFragment)
        }
    }


    override fun initEvent() {
        super.initEvent()
        lifecycleScope.launchWhenResumed {
            val cleanNum = arguments?.getString("clean_num")
            val bundle = bundleOf("clean_num" to cleanNum)
            delay(3000)
            navigate(R.id.action_ramBoostFragment_to_finishFragment,bundle)
        }
    }
}